package com.ccp.dev.workflow.dao;


import com.ccp.dev.core.basic.base.IBaseMapper;
import com.ccp.dev.workflow.bpminterface.IActDefMapper;
import com.ccp.dev.workflow.model.ExecutionStack;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassDescribe:流程执行堆栈 Dao
 * @author :jiayueqiao
 * Date: 2019-07-30
 * Since:1
 */
public interface ExecutionStackDao extends IBaseMapper<ExecutionStack,String>, IActDefMapper {

    /**
     * 根据流程实例id删除
     * @param procInstId 流程实例id
     */
    void delByProcInstId(String procInstId);

    /**
     * 根据流程实例id和节点id查询堆栈信息
     * @param procInstId 流程实例id
     * @param nodeId 节点id
     * @return list 执行堆栈记录列表
     */
    List<ExecutionStack> getByProcInstIdNodeId(@Param("procInstId") String procInstId, @Param("nodeId") String nodeId);

    /**
     * 根据流程实例id和节点id和token信息查询堆栈信息
     * @param procInstId 流程实例id
     * @param nodeId 节点id
     * @return list 执行堆栈记录列表
     */
    List<ExecutionStack> getByProcInstIdNodeIdToken(@Param("procInstId") String procInstId, @Param("nodeId") String nodeId,@Param("taskToken") String taskToken);
    /**
     * 按父ID取得所有的子堆栈信息
     * @param parentId 父id
     * @return list 执行堆栈记录列表
     */
    List<ExecutionStack> queryByParentId(String parentId);
}
